package com.s59.mp;

import com.s59.entity.BootOrder;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class SczMp {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sead(String mg, String key) {
        rabbitTemplate.convertAndSend("s59-directExchange",key,mg);
    }

    public void sead1(String mg, String key) {
        rabbitTemplate.convertAndSend("s59-topicExchange",key,mg);
    }

    public void sead2(String mg, String key) {
        rabbitTemplate.convertAndSend("s59-fanoutExchange",key,mg);
    }

    public void sead3(BootOrder order, String key) {
        rabbitTemplate.convertAndSend("s59-fanoutExchange",key,order);
    }
}
